﻿<!DOCTYPE html>
<html>
@using Common;
<!-- Mirrored from www.zi-han.net/theme/hplus/ by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:16:41 GMT -->
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title></title>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="shortcut icon" href="../favicon.ico">
    <link href="/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.min.css" rel="stylesheet">
    <link href="/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="~/css/lsj.css" rel="stylesheet" />
    <link href="~/css/ui-dialog.css" rel="stylesheet" />
</head>
@{
    var manager = ViewData["manager"] as Domain.user;
}
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
    <div id="wrapper">
        <!--左侧导航开始-->
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="nav-close">
                <i class="fa fa-times-circle"></i>
            </div>
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">
                    <li class="nav-header">
                        <div class="dropdown profile-element">
                            <span><img alt="image" class="img-circle2" src="/img/profile_small.jpg" /></span>
                            <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                                    <span class="block m-t-xs"><strong class="font-bold">@manager.username</strong></span>
                                    <span class="text-muted text-xs block">管理员<b class="caret"></b></span>
                                </span>
                            </a>
                            <ul class="dropdown-menu animated fadeInRight m-t-xs">
                                <li>
                                    <a class="J_menuItem" onclick="editManager()">修改密码</a>
                                </li>
                                <li class="divider"></li>
                                <li>
                                    <a href="/Home/login">安全退出</a>
                                </li>
                            </ul>
                        </div>
                        <div class="logo-element">
                            NH
                        </div>
                    </li>
                    @using Web.helper

                    @Html.Raw(Html.Menu(1))

                </ul>
            </div>
        </nav>
        <!--左侧导航结束-->

        @using Common;
        @using Web.helper;
        @using (Ajax.BeginForm("", new { }, new AjaxOptions() { HttpMethod = "Post", OnSuccess = "tips(data)", OnBegin = "ValidateLog" }))
        {
            <div class="modal fade bs-example-modal-sm" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="z-index:1000">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <input type="hidden" name="id" class="form-control" id="id">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel">修改密码</h4>
                        </div>
                        <div class="modal-body">
                            <input type="hidden" name="id" class="form-control" id="id">
                            <div class="form-group">
                                <label for="txt_departmentlevel">新密码</label>
                                <input type="password" name="txt_password" class="form-control" id="txt_password" placeholder="密码(必填)" required="">
                            </div>
                            <div class="form-group">
                                <label for="txt_statu">确认密码</label>
                                <input type="password" name="txt_passwords" class="form-control" id="txt_passwords" placeholder="确认密码(必填)" required="">
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
                            <button style="display: initial;" class="btn btn-primary block" id="btn_submit"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>保存</button>
                        </div>
                    </div>
                </div>
            </div>
        }


        <!--右侧部分开始-->
        <div id="page-wrapper" class="gray-bg dashbard-1">
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header">
                        <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
                        @*<form role="search" class="navbar-form-custom" method="post" action="http://www.zi-han.net/theme/hplus/search_results.html">
                            <div class="form-group">
                                <input type="text" placeholder="请输入您需要查找的内容 …" class="form-control" name="top-search" id="top-search">
                            </div>
                        </form>*@
                    </div>

                </nav>
            </div>
            <div class="row content-tabs">
                <button class="roll-nav roll-left J_tabLeft">
                    <i class="fa fa-backward"></i>
                </button>
                <nav class="page-tabs J_menuTabs">
                    <div class="page-tabs-content">
                        <a href="javascript:;" class="active J_menuTab" data-id="s1">首页</a>
                    </div>
                </nav>
                <button class="roll-nav roll-right J_tabRight">
                    <i class="fa fa-forward"></i>
                </button>
                <div class="btn-group roll-nav roll-right">
                    <button class="dropdown J_tabClose" data-toggle="dropdown">
                        关闭操作<span class="caret"></span>
                    </button>
                    <ul role="menu" class="dropdown-menu dropdown-menu-right">
                        <li class="J_tabShowActive">
                            <a>定位当前选项卡</a>
                        </li>
                        <li class="divider"></li>
                        <li class="J_tabCloseAll">
                            <a>关闭全部选项卡</a>
                        </li>
                        <li class="J_tabCloseOther">
                            <a>关闭其他选项卡</a>
                        </li>
                    </ul>
                </div>
                <a href="/Home/login" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
            </div>
            <div class="row J_mainContent" id="content-main">
                <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="../home/home" frameborder="0" data-id="s1"></iframe>
                @*<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="../Student/GetStudentInfo/5" frameborder="0" data-id="s2"></iframe>*@
            </div>
            <div class="footer">
                <div class="pull-right">

                </div>
            </div>
        </div>
        <!--右侧部分结束-->
        <!--右侧边栏开始-->
        <!--右侧边栏结束-->
    </div>
    <div id="loadingPage" style="display: none;">
        <div class="loading-shade"></div>
        <div class="loading-content" onclick="$.loading(false)">数据加载中，请稍后…</div>
    </div>
    <script src="/js/jquery.min.js?v=2.1.4"></script>
    <script src="/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="/js/plugins/layer/layer.min.js"></script>
    <script type="text/javascript" src="/js/contabs.min.js"></script>
    <script src="/js/plugins/pace/pace.min.js"></script>
    <script src="~/js/lsj.js"></script>
    <script src="/js/hplus.min.js?v=4.1.0"></script>
    <script src="~/js/jquery.unobtrusive-ajax.js"></script>
    <script src="~/js/dialog-plus-min.js"></script>
    <script src="~/js/jquery.cookie.js"></script>
    <script>
        //if (token == null || token == "")
        //{
        //    window.location.href = "/home/login";
        //}

        function editManager()
        {
            $("#myModalLabel").text("修改密码");
            $("#form0").attr("action", "/Home/EditManagerPwd");
            $("#id").val(@manager.ID);
            $('#myModal').modal();
        }

        //登录前js验证
        function ValidateLog() {
            if ($("#txt_password").val() != $("#txt_passwords").val()) {
                alert("两次输入密码不一致!");
                return false;
            }
            $.loading(true);
        }
        //登录回调函数
        function tips(data) {
            $.loading(false);
            if (data.status == 0) {
                //添加成功
                $('#myModal').modal('hide')



                var content = '<button class="btn btn-success btn-circle btn-lg" type="button"><i class="fa fa-check"></i></button><span class="dialog-content">' + data.msg + '</span>'
                var d = dialog({
                    fixed: true,
                    content: content,
                    padding: 20

                });
                d.show();
                //关闭提示模态框
                setTimeout(function () {
                    d.close().remove();
                    //刷新数据
                    window.location.href = "/home/login";
                }, 2000); 
            } else if (data.pitchId != "") {
                alert(data.msg);
            } else {
                //添加失败
                alert(data.msg);
            }
        }

        //输出提示信息
        function point(id, content) {
            var follow = document.getElementById(id);
            var d = dialog({
                align: 'bottom',
                content: '<span class="label label-warning">!</span> ' + content
            });
            d.show(follow);
            setTimeout(function () {
                d.close().remove();
            }, 2000);
        }
    </script>
</body>
</html>
